<?php require_once('application.php');?>
<div class="grid_7">
	<a href="<?php echo ROOT_URL; ?>">
		<img src="./img/logo.png" alt="AtImpress">
	</a>
</div>
<div class="grid_5">
	<?php if(!isset($_SESSION['user'])):?>
	<ul class="nav">
		<li>
			<a href="server/to_login.php?via=renren" title="用人人账号登录">
				<img alt="用人人账号登录" src="img/renren_connect.png" >
			</a>	
		</li>
		<li>
			<a href="server/to_login.php?via=sina" title="用新浪微博账号登录">
				<img alt="用新浪微博账号登录" src="img/sina_connect.gif" >
			</a>	
		</li>
	</ul>
	<?php else:?>
	<ul class="nav">
		<li>
			<a href="">
				<?php
					if(isset($_SESSION['user']['name'])){
						echo $_SESSION['user']['name'];
					}else{
						echo "已登录";
					}
				?>
			</a>
		</li>
		<li>
			<a href="shares.php">我的优惠 </a>
		</li>
		<li>
			<a href="sync.php">同步设置</a>
		</li>
		<li>
			<a href="<?php echo ROOT_URL."server/logout.php"; ?>">退出</a>
		</li>
	</ul>		
	<?php endif;?>
</div>
